package a.e.b.a;

import a.c.q;
import a.c.v;
import a.c.z;
import a.d.u;
import a.d.w;
import a.e.a.eb;
import a.e.a.x;
import a.e.b.b.a;
import a.f.zc;
import a.i.n;
import a.j.ab;
import a.j.c;
import a.j.g;
import a.j.*;
import a.j.tb;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.swing.*;
import java.awt.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Locale;

public class y
{
  private static final z a = new z();
  private static final int b = 32;
  static Class c;
  static Class d;
  static Class e;
  public static int f;
  
  private static void a(w paramw, a.e.b.c.cb paramcb)
  {
    if (paramw != null)
    {
      paramcb.a("x", paramw.a());
      paramcb.a("y", paramw.b());
    }
  }
  
  private static void a(a.d.s params, a.e.b.c.cb paramcb)
  {
    if (params != null)
    {
      paramcb.a("width", params.b());
      paramcb.a("height", params.c());
    }
  }
  
  private static void a(a.e.b.c.cb paramcb, String paramString, w paramw)
  {
    if (!i.i)
    {
      if (paramw == null) {
        return;
      }
      paramcb.a(paramString, "http://www.yworks.com/xml/graphml");
    }
    a(paramw, paramcb);
    paramcb.b();
  }
  
  public static void a(a.e.b.c.cb paramcb, a.f.zb paramzb)
  {
    boolean bool = i.i;
    int j = i.h;
    if (!bool) {
      if (paramzb == null) {
        return;
      }
    }
    w localw1 = paramzb.c();
    w localw2 = paramzb.d();
    paramcb.a("Path", "http://www.yworks.com/xml/graphml");
    if (!bool)
    {
      if ((paramzb instanceof tb))
      {
        if (bool) {
          break label136;
        }
        if (((tb)paramzb).z()) {
          paramcb.c("reversedPathRendering", "true");
        }
      }
      paramcb.a("sx", localw1.a());
      paramcb.a("sy", localw1.b());
      paramcb.a("tx", localw2.a());
      paramcb.a("ty", localw2.b());
    }
    label136:
    int i = 0;
    if (i < paramzb.a()) {}
    while (bool)
    {
      a(paramcb, "Point", paramzb.a(i));
      i++;
      if ((!bool) && (j != 0)) {
        return;
      }
      if (j == 0) {
        break;
      }
    }
    paramcb.b();
  }
  
  public static void a(a.e.b.c.cb paramcb, zc paramzc)
  {
    paramcb.a("Geometry", "http://www.yworks.com/xml/graphml");
    a(new w(paramzc.a(), paramzc.b()), paramcb);
    a(new a.d.s(paramzc.c(), paramzc.d()), paramcb);
    paramcb.b();
  }
  
  static void a(a.e.b.c.cb paramcb, String paramString, c paramc, Color paramColor)
  {
    boolean bool = i.i;
    String str = e.b(paramc.a());
    paramcb.a(paramString, "http://www.yworks.com/xml/graphml");
    paramcb.c("type", str);
    if (!bool)
    {
      paramcb.a("width", paramc.getLineWidth());
      if (paramColor != null)
      {
        a(paramcb, "color", paramColor);
        if (bool) {
          return;
        }
        if (i.h == 0) {
          break label87;
        }
      }
    }
    paramcb.c("hasColor", "false");
    label87:
    paramcb.b();
  }
  
  static void a(a.e.b.c.cb paramcb, String paramString, ab paramab1, ab paramab2)
  {
    paramcb.a(paramString, "http://www.yworks.com/xml/graphml").c("source", e.a(paramab1)).c("target", e.a(paramab2)).b();
  }
  
  public static String a(Color paramColor)
  {
    boolean bool = i.i;
    int j = i.h;
    if (paramColor != null)
    {
      StringBuffer localStringBuffer = new StringBuffer(9);
      localStringBuffer.append('#');
      String str = Integer.toHexString(paramColor.getRed()).toUpperCase(Locale.US);
      int i = 2 - str.length();
      do
      {
        if (i <= 0) {
          break;
        }
        localStringBuffer.append('0');
        i--;
        if (bool) {
          break label112;
        }
        if (j != 0) {
          break label106;
        }
      } while (j == 0);
      localStringBuffer.append(str);
      if (!bool)
      {
        str = Integer.toHexString(paramColor.getGreen()).toUpperCase(Locale.US);
        label106:
        label112:
        i = 2 - str.length();
        do
        {
          if (i <= 0) {
            break;
          }
          localStringBuffer.append('0');
          i--;
          if (bool) {
            break label173;
          }
          if (j != 0) {
            break label167;
          }
        } while (j == 0);
        localStringBuffer.append(str);
      }
      if (!bool)
      {
        str = Integer.toHexString(paramColor.getBlue()).toUpperCase(Locale.US);
        label167:
        label173:
        i = 2 - str.length();
        if (i > 0) {}
        while (bool)
        {
          localStringBuffer.append('0');
          i--;
          if (bool) {
            break label218;
          }
          if (j != 0) {
            break label214;
          }
          if (j == 0) {
            break;
          }
        }
        localStringBuffer.append(str);
        label214:
        label218:
        if (!bool)
        {
          if (paramColor.getAlpha() != 255) {
            str = Integer.toHexString(paramColor.getAlpha()).toUpperCase(Locale.US);
          }
        }
        else
        {
          i = 2 - str.length();
          if (i > 0) {}
          for (;;)
          {
            if (!bool)
            {
              localStringBuffer.append('0');
              i--;
              if (j == 0)
              {
                if (j == 0) {
                  break;
                }
                if (bool) {
                  continue;
                }
                localStringBuffer.append(str);
              }
            }
          }
        }
      }
      return localStringBuffer.toString();
    }
    return null;
  }
  
  static void a(a.e.b.c.cb paramcb, String paramString, Color paramColor)
  {
    String str = a(paramColor);
    if (str != null) {
      paramcb.c(paramString, str);
    }
  }
  
  static void a(a.e.b.c.cb paramcb, hg paramhg, a.e.b.c.o paramo)
  {
    boolean bool = i.i;
    int i = i.h;
    a.d.o localo = paramhg.I();
    a.d.t localt = localo.a();
    paramcb.a("x", localt.d());
    paramcb.a("y", localt.e());
    paramcb.a("width", paramhg.g());
    paramcb.a("height", paramhg.k());
    if (!bool)
    {
      if (localo.j() != -1.0D)
      {
        paramcb.a("anchorX", localo.d());
        paramcb.a("anchorY", localo.e());
        paramcb.a("upX", localo.i());
        paramcb.a("upY", localo.j());
      }
      paramcb.a("visible", paramhg.B());
      paramcb.c("alignment", a.e.a.cb.a(paramhg.M()));
      paramcb.c("fontFamily", paramhg.V());
      paramcb.a("fontSize", paramhg.W());
      paramcb.c("fontStyle", a.e.a.cb.a(paramhg.X()));
      if (!bool) {
        a(paramcb, "textColor", paramhg.A());
      }
    }
    else if (paramhg.F() != null)
    {
      if (bool) {
        break label260;
      }
      a(paramcb, "backgroundColor", paramhg.F());
      if (i == 0) {
        break label268;
      }
    }
    label260:
    paramcb.c("hasBackgroundColor", "false");
    label268:
    if (paramhg.G() != null)
    {
      if (bool) {
        break label298;
      }
      a(paramcb, "lineColor", paramhg.G());
      if (i == 0) {
        break label306;
      }
    }
    label298:
    paramcb.c("hasLineColor", "false");
    label306:
    if (!bool) {
      if (paramhg.Y() != null) {
        paramcb.c("configuration", paramhg.Y());
      }
    }
    if (!bool) {
      if (paramhg.Z() != 0) {
        paramcb.c("autoSizePolicy", eb.b(paramhg.Z()));
      }
    }
    Insets localInsets = paramhg.y();
    if (localInsets != null) {
      a(paramcb, localInsets, paramo);
    }
    Icon localIcon = paramhg.z();
    if (!bool)
    {
      if (localIcon != null)
      {
        a(paramcb, "icon", localIcon, paramo);
        paramcb.c("horizontalTextPosition", a(paramhg.u()));
        paramcb.c("verticalTextPosition", c(paramhg.t()));
      }
    }
    else {
      paramcb.a("iconTextGap", paramhg.v());
    }
    if (!bool) {
      if (paramhg.x() != 0.0D) {
        paramcb.a("rotationAngle", paramhg.x());
      }
    }
    if (paramhg.w()) {
      paramcb.c("underlinedText", "true");
    }
  }
  
  static void a(a.e.b.c.cb paramcb, String paramString, Icon paramIcon, a.e.b.c.o paramo)
  {
    boolean bool = i.i;
    int i = i.h;
    if (!bool) {
      if ((paramIcon instanceof zb))
      {
        paramcb.c(paramString, ((zb)paramIcon).a());
        if (!bool) {
          if (i == 0) {
            return;
          }
        }
      }
      else
      {
        if (bool) {
          break label84;
        }
      }
    }
    if ((paramIcon instanceof ImageIcon))
    {
      if (bool) {
        break label84;
      }
      a(((ImageIcon)paramIcon).getImage(), paramcb, "image", paramo);
      if (i == 0) {
        return;
      }
    }
    label84:
    a(paramIcon, paramcb, "iconData", paramo);
  }
  
  private static void a(a.e.b.c.cb paramcb, Insets paramInsets, a.e.b.c.o paramo)
  {
    paramcb.a("topInset", paramInsets.top).a("bottomInset", paramInsets.bottom).a("leftInset", paramInsets.left).a("rightInset", paramInsets.right);
  }
  
  private static void a(hg paramhg, Element paramElement, a.e.b.b.t paramt)
  {
    boolean bool = i.i;
    int i = 0;
    int j = 0;
    int k = 0;
    int m = 0;
    int n = 0;
    String str = paramElement.getAttribute("topInset");
    if (!bool)
    {
      if (!"".equals(str))
      {
        n = 1;
        i = Integer.parseInt(str);
      }
      str = paramElement.getAttribute("bottomInset");
    }
    if (!bool)
    {
      if (!"".equals(str))
      {
        n = 1;
        j = Integer.parseInt(str);
      }
      str = paramElement.getAttribute("leftInset");
    }
    if (!bool)
    {
      if (!"".equals(str))
      {
        n = 1;
        k = Integer.parseInt(str);
      }
      str = paramElement.getAttribute("rightInset");
    }
    if (!bool) {
      if (!"".equals(str))
      {
        n = 1;
        m = Integer.parseInt(str);
      }
    }
    if (n != 0) {
      paramhg.a(new Insets(i, k, j, m));
    }
  }
  
  static void a(a.e.b.c.cb paramcb, String paramString, u paramu)
  {
    paramcb.a(paramString, "http://www.yworks.com/xml/graphml").a("top", Math.round(paramu.b)).a("bottom", Math.round(paramu.d)).a("left", Math.round(paramu.c)).a("right", Math.round(paramu.e)).a("topF", paramu.b).a("bottomF", paramu.d).a("leftF", paramu.c).a("rightF", paramu.e).b();
  }
  
  private static URL a(a.e.b.b.t paramt)
  {
    boolean bool = i.i;
    if (!bool) {
      if (paramt == null) {
        return null;
      }
    }
    q localq = paramt.d();
    if ((bool) || ((localq instanceof g))) {
      return ((g)localq).cb();
    }
    return null;
  }
  
  static Icon a(String paramString, a.e.b.b.t paramt)
    throws a
  {
    URL localURL1 = null;
    URL localURL2 = a(paramt);
    try
    {
      localURL1 = new URL(paramString);
    }
    catch (MalformedURLException localMalformedURLException1)
    {
      try
      {
        localURL1 = new URL(localURL2, paramString);
      }
      catch (MalformedURLException localMalformedURLException2)
      {
        String str = "Cannot load image from path: " + localMalformedURLException2.getMessage();
        if (!i.i)
        {
          if (a(paramt, "y.io.graphml.input.DeserializationProperties.IGNORE_RESOURCE_ERRORS")) {
            n.a(str + ", ignoring Postprocessor");
          }
        }
        else {
          if (i.h == 0) {
            break label117;
          }
        }
        throw new a(str, localMalformedURLException2);
      }
    }
    label117:
    return new zb(localURL1, paramString);
  }
  
  public static String a(Node paramNode)
  {
    boolean bool = i.i;
    int j = i.h;
    NodeList localNodeList = paramNode.getChildNodes();
    StringBuffer localStringBuffer = new StringBuffer();
    if (localNodeList != null)
    {
      int i = 0;
      do
      {
        if (i >= localNodeList.getLength()) {
          break;
        }
        Node localNode = localNodeList.item(i);
        if (!bool) {
          if (3 != localNode.getNodeType())
          {
            if (!bool) {
              if (4 != localNode.getNodeType()) {
                break;
              }
            }
          }
          else
          {
            localStringBuffer.append(localNode.getNodeValue());
            i++;
          }
        }
      } while (j == 0);
    }
    return localStringBuffer.toString();
  }
  
  static u b(Node paramNode)
  {
    boolean bool = i.i;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    double d1 = 0.0D;
    Node localNode = localNamedNodeMap.getNamedItem("topF");
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("top");
      }
    }
    if ((bool) || (localNode != null)) {
      d1 = Double.parseDouble(localNode.getNodeValue());
    }
    double d2 = 0.0D;
    localNode = localNamedNodeMap.getNamedItem("bottomF");
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("bottom");
      }
    }
    if ((bool) || (localNode != null)) {
      d2 = Double.parseDouble(localNode.getNodeValue());
    }
    double d3 = 0.0D;
    localNode = localNamedNodeMap.getNamedItem("leftF");
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("left");
      }
    }
    if ((bool) || (localNode != null)) {
      d3 = Double.parseDouble(localNode.getNodeValue());
    }
    double d4 = 0.0D;
    localNode = localNamedNodeMap.getNamedItem("rightF");
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("right");
      }
    }
    if ((bool) || (localNode != null)) {
      d4 = Double.parseDouble(localNode.getNodeValue());
    }
    return new u(d1, d3, d2, d4);
  }
  
  public static void a(Node paramNode, zc paramzc)
  {
    boolean bool = i.i;
    double d1 = paramzc.a();
    double d2 = paramzc.b();
    double d3 = paramzc.c();
    double d4 = paramzc.d();
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode = localNamedNodeMap.getNamedItem("x");
    if (!bool)
    {
      if (localNode != null) {
        d1 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("y");
    }
    if (!bool)
    {
      if (localNode != null) {
        d2 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("width");
    }
    if (!bool)
    {
      if (localNode != null) {
        d3 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("height");
    }
    if ((bool) || (localNode != null)) {
      d4 = Double.parseDouble(localNode.getNodeValue());
    }
    if ((bool) || (d3 == paramzc.c()))
    {
      if (bool) {
        break label227;
      }
      if (d4 == paramzc.d()) {}
    }
    else
    {
      paramzc.b(d3, d4);
    }
    label227:
    if ((bool) || ((d1 != paramzc.a()) || (d2 != paramzc.b()))) {
      paramzc.a(d1, d2);
    }
  }
  
  public static void a(Node paramNode, a.f.zb paramzb)
  {
    boolean bool = i.i;
    int j = i.h;
    double d1 = 0.0D;
    double d2 = 0.0D;
    double d3 = 0.0D;
    double d4 = 0.0D;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    if ((paramzb instanceof tb))
    {
      localNode1 = localNamedNodeMap.getNamedItem("reversedPathRendering");
      if (bool) {
        break label90;
      }
      if (localNode1 != null) {
        ((tb)paramzb).a(Boolean.valueOf(localNode1.getNodeValue()).booleanValue());
      }
    }
    Node localNode1 = localNamedNodeMap.getNamedItem("sx");
    label90:
    if (!bool)
    {
      if (localNode1 != null) {
        d1 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("sy");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d2 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("tx");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d3 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("ty");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d4 = Double.parseDouble(localNode1.getNodeValue());
      }
      paramzb.a(new w(d1, d2));
      paramzb.b(new w(d3, d4));
    }
    NodeList localNodeList = paramNode.getChildNodes();
    if (localNodeList != null)
    {
      int i = 0;
      do
      {
        if (i >= localNodeList.getLength()) {
          break;
        }
        Node localNode2 = localNodeList.item(i);
        if (!bool)
        {
          if (localNode2.getNodeType() == 1)
          {
            String str = localNode2.getLocalName();
            if (bool) {
              continue;
            }
            if ("Point".equals(str))
            {
              w localw = d(localNode2);
              paramzb.a(localw.a(), localw.b());
            }
          }
          i++;
        }
      } while (j == 0);
    }
  }
  
  static w d(Node paramNode)
  {
    boolean bool = i.i;
    double d1 = 0.0D;
    double d2 = 0.0D;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode = localNamedNodeMap.getNamedItem("x");
    if (!bool)
    {
      if (localNode != null) {
        d1 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("y");
    }
    if ((bool) || (localNode != null)) {
      d2 = Double.parseDouble(localNode.getNodeValue());
    }
    return new w(d1, d2);
  }
  
  static c e(Node paramNode)
  {
    boolean bool = i.i;
    String str = "line";
    double d1 = 1.0D;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode = localNamedNodeMap.getNamedItem("type");
    if (!bool)
    {
      if (localNode != null) {
        str = localNode.getNodeValue();
      }
      localNode = localNamedNodeMap.getNamedItem("width");
    }
    if ((bool) || (localNode != null)) {
      d1 = Double.parseDouble(localNode.getNodeValue());
    }
    return c.a((int)d1, a.e.a.s.h(str));
  }
  
  static ab a(Node paramNode, String paramString)
  {
    boolean bool = i.i;
    ab localab = null;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode = localNamedNodeMap.getNamedItem(paramString);
    if ((bool) || (localNode != null)) {
      localab = a.e.a.s.i(localNode.getNodeValue());
    }
    if (!bool) {
      if (localab == null) {
        localab = ab.e;
      }
    }
    return localab;
  }
  
  static a.d.o a(Node paramNode, double paramDouble1, double paramDouble2)
  {
    boolean bool = i.i;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    double d1 = (0.0D / 0.0D);
    double d2 = (0.0D / 0.0D);
    double d3 = (0.0D / 0.0D);
    double d4 = (0.0D / 0.0D);
    double d5 = (0.0D / 0.0D);
    double d6 = (0.0D / 0.0D);
    double d7 = (0.0D / 0.0D);
    double d8 = (0.0D / 0.0D);
    double d9 = (0.0D / 0.0D);
    Node localNode = localNamedNodeMap.getNamedItem("x");
    if (!bool)
    {
      if (localNode != null) {
        d1 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("y");
    }
    if (!bool)
    {
      if (localNode != null) {
        d2 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("width");
    }
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("w");
      }
    }
    if (!bool)
    {
      if (localNode != null) {
        d3 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("height");
    }
    if (!bool) {
      if (localNode == null) {
        localNode = localNamedNodeMap.getNamedItem("h");
      }
    }
    if (!bool)
    {
      if (localNode != null) {
        d4 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("anchorX");
    }
    if (!bool)
    {
      if (localNode != null) {
        d5 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("anchorY");
    }
    if (!bool)
    {
      if (localNode != null) {
        d6 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("upX");
    }
    if (!bool)
    {
      if (localNode != null) {
        d7 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("upY");
    }
    if (!bool)
    {
      if (localNode != null) {
        d8 = Double.parseDouble(localNode.getNodeValue());
      }
      localNode = localNamedNodeMap.getNamedItem("rotationAngle");
    }
    if ((bool) || (localNode != null)) {
      d9 = Double.parseDouble(localNode.getNodeValue());
    }
    if (((bool) || (!Double.isNaN(d3))) && ((bool) || (!Double.isNaN(d4))))
    {
      if (!bool) {
        if (!Double.isNaN(d9))
        {
          if (bool) {
            break label500;
          }
          if (d9 != 0.0D)
          {
            a.d.o localo = new a.d.o(0.0D, 0.0D, d3, d4);
            localo.a(-Math.toRadians(d9));
            a.d.t localt = localo.a();
            d3 = localt.b();
            d4 = localt.c();
          }
        }
      }
      label500:
      if (!bool) {
        if (!Double.isNaN(d5))
        {
          if (bool) {
            break label605;
          }
          if (!Double.isNaN(d6))
          {
            if (bool) {
              break label605;
            }
            if (!Double.isNaN(d7))
            {
              if (bool) {
                break label605;
              }
              if (!Double.isNaN(d8))
              {
                if ((bool) || ((d7 == 0.0D) && ((bool) || (d8 == 0.0D)))) {
                  d8 = -1.0D;
                }
                return new a.d.o(paramDouble1 + d5, paramDouble2 + d6, d3, d4, d7, d8);
              }
            }
          }
        }
      }
      label605:
      if ((bool) || ((!Double.isNaN(d1)) && (!Double.isNaN(d2)))) {
        return new a.d.o(paramDouble1 + d1, paramDouble2 + d2 + d4, d3, d4, 0.0D, -1.0D);
      }
    }
    return null;
  }
  
  static void a(Node paramNode, hg paramhg, a_ parama_, a.e.b.b.t paramt)
    throws a
  {
    boolean bool = i.i;
    int i = i.h;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode1 = localNamedNodeMap.getNamedItem("hasText");
    if ((localNode1 == null) || (!"false".equalsIgnoreCase(localNode1.getNodeValue()))) {
      paramhg.a(a(paramNode));
    }
    double d1 = (0.0D / 0.0D);
    double d2 = (0.0D / 0.0D);
    double d3 = (0.0D / 0.0D);
    double d4 = (0.0D / 0.0D);
    double d5 = (0.0D / 0.0D);
    double d6 = (0.0D / 0.0D);
    double d7 = (0.0D / 0.0D);
    double d8 = (0.0D / 0.0D);
    localNode1 = localNamedNodeMap.getNamedItem("x");
    if (!bool)
    {
      if (localNode1 != null) {
        d1 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("y");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d2 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("w");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d3 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("h");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d4 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("autoSizePolicy");
    }
    if (localNode1 != null) {
      paramhg.g(x.g(localNode1.getNodeValue()));
    }
    if ((bool) || ((!Double.isNaN(d3)) && (!Double.isNaN(d4))))
    {
      paramhg.b(d4);
      paramhg.a(d3);
      paramhg.a(d3, d4);
    }
    localNode1 = localNamedNodeMap.getNamedItem("width");
    if (!bool)
    {
      if (localNode1 != null) {
        d3 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("height");
    }
    if ((bool) || (localNode1 != null)) {
      d4 = Double.parseDouble(localNode1.getNodeValue());
    }
    if ((bool) || ((!Double.isNaN(d3)) && (!Double.isNaN(d4)))) {
      paramhg.a(d3, d4);
    }
    localNode1 = localNamedNodeMap.getNamedItem("anchorX");
    if (!bool)
    {
      if (localNode1 != null) {
        d5 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("anchorY");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d6 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("upX");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        d7 = Double.parseDouble(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("upY");
    }
    if ((bool) || (localNode1 != null)) {
      d8 = Double.parseDouble(localNode1.getNodeValue());
    }
    if (!bool) {
      if (!Double.isNaN(d7))
      {
        if (bool) {
          break label672;
        }
        if (!Double.isNaN(d8))
        {
          if (bool) {
            break label672;
          }
          if (!Double.isNaN(d5))
          {
            if (bool) {
              break label672;
            }
            if (!Double.isNaN(d6))
            {
              if (bool) {
                break label672;
              }
              if (!Double.isNaN(d3))
              {
                if (bool) {
                  break label672;
                }
                if (!Double.isNaN(d4))
                {
                  if (!bool)
                  {
                    if (d7 == 0.0D)
                    {
                      if (bool) {
                        break label664;
                      }
                      if (d8 == 0.0D) {
                        d8 = -1.0D;
                      }
                    }
                    paramhg.a(new a.d.o(d5, d6, d3, d4, d7, d8));
                    if (bool) {
                      break label707;
                    }
                  }
                  label664:
                  if (i == 0) {
                    break label696;
                  }
                }
              }
            }
          }
        }
      }
    }
    label672:
    if ((bool) || ((!Double.isNaN(d1)) && (!Double.isNaN(d2)))) {
      paramhg.c(d1, d2);
    }
    label696:
    localNode1 = localNamedNodeMap.getNamedItem("visible");
    label707:
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.f(Boolean.valueOf(localNode1.getNodeValue()).booleanValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("alignment");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.f(x.k(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("textColor");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.a(a(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("backgroundColor");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.b(a(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("hasBackgroundColor");
    }
    if (!bool)
    {
      if (localNode1 != null)
      {
        if (bool) {
          break label912;
        }
        if (Boolean.valueOf(localNode1.getNodeValue()).equals(Boolean.FALSE))
        {
          paramhg.b(null);
          if (bool) {
            break label945;
          }
          if (i == 0) {
            break label934;
          }
        }
      }
      localNode1 = localNamedNodeMap.getNamedItem("backgroundColor");
    }
    label912:
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.b(a(localNode1.getNodeValue()));
      }
      label934:
      localNode1 = localNamedNodeMap.getNamedItem("hasLineColor");
    }
    label945:
    if (!bool)
    {
      if (localNode1 != null)
      {
        if (bool) {
          break label1007;
        }
        if (Boolean.valueOf(localNode1.getNodeValue()).equals(Boolean.FALSE))
        {
          paramhg.c(null);
          if (bool) {
            break label1040;
          }
          if (i == 0) {
            break label1029;
          }
        }
      }
      localNode1 = localNamedNodeMap.getNamedItem("lineColor");
    }
    label1007:
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.c(a(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("fontFamily");
    }
    label1029:
    label1040:
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.b(localNode1.getNodeValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("fontSize");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.a(Integer.parseInt(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("fontStyle");
    }
    if (!bool) {
      if (localNode1 != null) {
        paramhg.b(x.h(localNode1.getNodeValue()));
      }
    }
    Icon localIcon = a(paramNode, "icon", paramt);
    if (!bool)
    {
      if (localIcon != null) {
        paramhg.a(localIcon);
      }
      localNode1 = localNamedNodeMap.getNamedItem("horizontalTextPosition");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.b(b(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("verticalTextPosition");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.a(c(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("iconTextGap");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.c(Byte.parseByte(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("rotationAngle");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.c(Double.parseDouble(localNode1.getNodeValue()));
      }
      localNode1 = localNamedNodeMap.getNamedItem("underlinedText");
    }
    if (!bool)
    {
      if (localNode1 != null) {
        paramhg.e(Boolean.valueOf(localNode1.getNodeValue()).booleanValue());
      }
      localNode1 = localNamedNodeMap.getNamedItem("configuration");
    }
    if (!bool) {
      if (localNode1 != null)
      {
        if (bool) {
          break label1452;
        }
        localObject1 = localNode1.getNodeValue();
        if (localObject1 != null)
        {
          if (bool) {
            break label1460;
          }
          if (((String)localObject1).length() > 0)
          {
            try
            {
              paramhg.c(localNode1.getNodeValue());
            }
            catch (IllegalArgumentException localIllegalArgumentException1)
            {
              if (bool) {
                break label1460;
              }
            }
            if (!parama_.a(paramhg, paramNode, paramt)) {
              throw new a("Unknown configuration " + (String)localObject1, localIllegalArgumentException1);
            }
          }
        }
      }
    }
    label1452:
    if (!bool) {
      if ((paramNode instanceof Element)) {
        label1460:
        a(paramhg, (Element)paramNode, paramt);
      }
    }
    Object localObject1 = localNamedNodeMap.getNamedItem("userdata");
    Node localNode2 = localNamedNodeMap.getNamedItem("userdataclass");
    if (((bool) || (localObject1 != null)) && ((bool) || (localNode2 != null)))
    {
      String str1 = ((Node)localObject1).getNodeValue();
      String str2 = localNode2.getNodeValue();
      try
      {
        Object localObject2 = a.i.ib.c().a(str1, Class.forName(str2));
        paramhg.b(localObject2);
      }
      catch (IllegalArgumentException localIllegalArgumentException2)
      {
        str3 = "Could not parse userdata " + str1 + ": " + localIllegalArgumentException2.getMessage();
        if (!bool)
        {
          if (a(paramt, "y.io.graphml.graph2d.UserDataSupport.IGNORE_STRING_CONVERSION_ERRORS")) {
            n.a(str3);
          }
        }
        else if (i == 0) {
          return;
        }
        throw new a(str3, localIllegalArgumentException2);
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        String str3 = "Could not parse userdata " + str1 + ": " + localClassNotFoundException.getMessage();
        if (!bool)
        {
          if (a(paramt, "y.io.graphml.graph2d.UserDataSupport.IGNORE_STRING_CONVERSION_ERRORS")) {
            n.a(str3);
          }
        }
        else if (i == 0) {
          return;
        }
        throw new a(str3, localClassNotFoundException);
      }
    }
  }
  
  static Icon a(Node paramNode, String paramString, a.e.b.b.t paramt)
    throws a
  {
    boolean bool = i.i;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Node localNode = localNamedNodeMap.getNamedItem(paramString);
    if (!bool)
    {
      if (localNode != null) {
        return a(localNode.getNodeValue(), paramt);
      }
      localNode = localNamedNodeMap.getNamedItem("image");
    }
    if (!bool)
    {
      if (localNode != null)
      {
        Image localImage = b(localNode.getNodeValue(), paramt);
        if (localImage != null) {
          return new ImageIcon(localImage);
        }
      }
      else
      {
        localNode = localNamedNodeMap.getNamedItem("iconData");
      }
    }
    else if ((bool) || (localNode != null))
    {
      if (!bool) {}
      return (Icon)a(localNode.getNodeValue(), paramt, c == null ? (y.c = d("javax.swing.Icon")) : c);
    }
    return null;
  }
  
  public static Color a(String paramString)
  {
    boolean bool = i.i;
    int k = i.h;
    synchronized (a)
    {
      if ((bool) || (paramString.length() >= 1))
      {
        if (bool) {
          break label61;
        }
        if (paramString.charAt(0) == '#') {}
      }
      else
      {
        return Color.BLACK;
      }
      if (!bool) {
        if (paramString.length() > 7)
        {
          label61:
          i = Integer.parseInt(paramString.substring(1, 7), 16);
          j = Integer.parseInt(paramString.substring(7), 16);
          i += ((j & 0xFF) << 24);
          if (bool) {
            break label126;
          }
          if (k == 0) {
            break label127;
          }
        }
      }
      int j = Integer.parseInt(paramString.substring(1), 16);
      label126:
      int i = j + -16777216;
      label127:
      Object localObject1 = a.f();
      Object localObject2;
      do
      {
        if (localObject1 == null) {
          break;
        }
        localObject2 = (Color)((v)localObject1).c();
        if (k != 0) {
          break label205;
        }
        if (!bool)
        {
          if (((Color)localObject2).getRGB() == i)
          {
            a.h((v)localObject1);
            a.b((v)localObject1);
            return localObject2;
          }
          localObject1 = ((v)localObject1).a();
        }
      } while (k == 0);
      label205:
      localObject1 = new Color(i, true);
      if (!bool) {
        if (a.size() >= 32)
        {
          localObject2 = a.g();
          a.h((v)localObject2);
          ((v)localObject2).a(localObject1);
          if (bool) {
            break label266;
          }
          a.b((v)localObject2);
          if (k == 0) {
            break label271;
          }
        }
      }
      label266:
      a.a(localObject1);
      label271:
      return localObject1;
    }
  }
  
  private static byte b(String paramString)
  {
    boolean bool = i.i;
    if (!bool) {
      if ("left".equals(paramString)) {
        return 8;
      }
    }
    if (!bool) {
      if ("right".equals(paramString)) {
        return 16;
      }
    }
    if (!bool) {
      if ("left_aligned".equals(paramString)) {
        return 32;
      }
    }
    if (!bool) {
      if ("right_aligned".equals(paramString)) {
        return 64;
      }
    }
    return 2;
  }
  
  private static byte c(String paramString)
  {
    boolean bool = i.i;
    if (!bool) {
      if ("top".equals(paramString)) {
        return 1;
      }
    }
    if (!bool) {
      if ("center".equals(paramString)) {
        return 2;
      }
    }
    return 4;
  }
  
  private static String a(byte paramByte)
  {
    switch (paramByte)
    {
    case 8: 
      return "left";
    case 16: 
      return "right";
    case 2: 
      return "center";
    case 32: 
      return "left_aligned";
    case 64: 
      return "right_aligned";
    }
    return "center";
  }
  
  private static String c(byte paramByte)
  {
    switch (paramByte)
    {
    case 1: 
      return "top";
    case 4: 
      return "bottom";
    case 2: 
      return "center";
    }
    return "bottom";
  }
  
  public static void a(Object paramObject, a.e.b.c.cb paramcb, String paramString, a.e.b.c.o paramo)
  {
    boolean bool = i.i;
    if ((bool) || ((paramo == null) || (paramObject == null))) {
      return;
    }
    if (!bool) {}
    kb localkb = (kb)paramo.a(d == null ? (y.d = d("a.e.b.a.kb")) : d);
    if ((bool) || (localkb != null))
    {
      ib localib = localkb.a(paramObject, null);
      if (localib != null) {
        paramcb.c(paramString, localib.b());
      }
    }
  }
  
  public static void a(Image paramImage, a.e.b.c.cb paramcb, String paramString, a.e.b.c.o paramo)
  {
    boolean bool = i.i;
    if ((paramo == null) || (paramImage == null)) {
      return;
    }
    if (!bool) {}
    kb localkb = (kb)paramo.a(d == null ? (y.d = d("a.e.b.a.kb")) : d);
    if ((bool) || (localkb != null))
    {
      ib localib = localkb.a(paramImage, lb.y_.a(), paramImage.getClass().getName());
      if (localib != null) {
        paramcb.c(paramString, localib.b());
      }
    }
  }
  
  public static Object a(String paramString, a.e.b.b.t paramt, Class paramClass)
    throws a
  {
    boolean bool = i.i;
    if (!bool) {
      if (paramt == null) {
        return null;
      }
    }
    if (!bool) {}
    jb localjb = (jb)paramt.a(e == null ? (y.e = d("a.e.b.a.jb")) : e);
    if ((bool) || (localjb != null)) {
      return localjb.a(paramString, null, paramClass, paramt);
    }
    return null;
  }
  
  public static Image b(String paramString, a.e.b.b.t paramt)
    throws a
  {
    boolean bool = i.i;
    if (!bool) {
      if (paramt == null) {
        return null;
      }
    }
    if (!bool) {}
    jb localjb = (jb)paramt.a(e == null ? (y.e = d("a.e.b.a.jb")) : e);
    if ((bool) || (localjb != null)) {
      return (Image)localjb.a(paramString, lb.eb_.a(), null, paramt);
    }
    return null;
  }
  
  public static boolean a(a.e.b.c.o paramo, Object paramObject)
  {
    boolean bool = i.i;
    Object localObject = paramo.a(paramObject);
    if ((bool) || (localObject != null))
    {
      if (bool) {
        break label40;
      }
      if ((localObject instanceof Boolean)) {
        return ((Boolean)localObject).booleanValue();
      }
    }
    label40:
    return false;
  }
  
  public static boolean a(a.e.b.b.t paramt, Object paramObject)
  {
    boolean bool = i.i;
    Object localObject = paramt.a(paramObject);
    if ((bool) || (localObject != null))
    {
      if (bool) {
        break label40;
      }
      if ((localObject instanceof Boolean)) {
        return ((Boolean)localObject).booleanValue();
      }
    }
    label40:
    return false;
  }
  
  public static String f(Node paramNode)
  {
    boolean bool = i.i;
    int j = i.h;
    paramNode.normalize();
    NodeList localNodeList = paramNode.getChildNodes();
    StringBuffer localStringBuffer = new StringBuffer();
    int i = 0;
    label106:
    do
    {
      if (i >= localNodeList.getLength()) {
        break;
      }
      Node localNode = localNodeList.item(i);
      if (!bool) {
        if (localNode.getNodeType() != 3)
        {
          if (!bool) {
            if (localNode.getNodeType() != 4) {
              break label106;
            }
          }
        }
        else {
          localStringBuffer.append(localNode.getNodeValue());
        }
      }
      if (!bool)
      {
        if (j != 0) {
          localStringBuffer.append(f(localNode));
        }
        i++;
      }
    } while (j == 0);
    return localStringBuffer.toString();
  }
  
  static Class d(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  static
  {
    a.add(Color.BLACK);
    a.add(Color.RED);
    a.add(Color.BLUE);
    a.add(Color.YELLOW);
    a.add(Color.GREEN);
    a.add(Color.WHITE);
  }
  
  static abstract interface a_
  {
    public abstract boolean a(hg paramhg, Node paramNode, a.e.b.b.t paramt);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.a.y

 * JD-Core Version:    0.7.0.1

 */